package jvisualvmTest;

import java.io.IOException;
import java.text.ParseException;

/**
 * Created by yangluhua on 2016/9/18 0018.
 */
public class JvisualvmTest {
    static int a = 0;
    
    public static void main(String[] args) throws ParseException, IOException {

        for (int i = 0; i < 100000; i++) { //延时以便profiler有足够的时间和 JVM通信
            for (int j = 0; j < 100000; j++) {
            }
            test();
        }
    }

    public static void test() {
        for (int i = 0; i < 100000; i++) {
            for (int j = 0; j < 100000; j++) {
                a++;
            }
        }
        testRun();
    }

    public static void testRun() {
        for (int i = 0; i < 100000; i++) {
            for (int j = 0; j < 100000; j++) {
                a--;
            }
        }
    }
}
